WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()

if ("${PORT}" STREQUAL "Efl")
    if (DEVELOPER_MODE)
      add_subdirectory(WebKitTestRunner)
      add_subdirectory(ImageDiff)
      if (ENABLE_X11_TARGET)
        add_subdirectory(DumpRenderTree/TestNetscapePlugIn)
      endif ()
    endif ()

    if (ENABLE_MINIBROWSER)
      add_subdirectory(MiniBrowser/efl)
    endif ()
elseif ("${PORT}" STREQUAL "GTK")
    if (DEVELOPER_MODE)
      add_subdirectory(WebKitTestRunner)
      add_subdirectory(ImageDiff)
      if (ENABLE_API_TESTS)
          add_subdirectory(TestWebKitAPI/Tests/WebKit2Gtk)
      endif ()
      if (ENABLE_X11_TARGET)
          add_subdirectory(DumpRenderTree/TestNetscapePlugIn)
      endif ()
    endif ()

    if (ENABLE_MINIBROWSER)
        add_subdirectory(MiniBrowser/gtk)
    endif ()
endif ()

if (WIN32)
    #add_subdirectory(DumpRenderTree)
    # TODO: Enable when Qt port ready
    if (NOT "${PORT}" STREQUAL "Qt")
        add_subdirectory(TestWebKitAPI)
        add_subdirectory(MiniBrowser/win)
    endif ()
endif ()

if (ENABLE_WEBKIT2 AND ENABLE_API_TESTS)
    add_subdirectory(TestWebKitAPI)
endif ()
